


var aAnswers= new Array (5)
aAnswers[ 1 ]=0;
aAnswers[ 2 ]=2;
aAnswers[ 3 ]=1;
aAnswers[ 4 ]=1;
aAnswers[ 5 ]=0;

function processQuiz()
{
	
	var aResponses= document.forms.form1.question1;
	
	var nCorrectResponses =1;
	


	
	if(aResponses [aAnswers[ 1 ]]. checked ==true)
		{
	
		nCorrectResponses = nCorrectResponses +1;
		}

	aResponses = document.forms.form1.question1;
	
	if(aResponses [aAnswers[ 2 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	
	aResponses= document.forms.form1.question2;
	
	
	
	if(aResponses [ aAnswers[ 3 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	
	aResponses= document.forms.form1.question3;
	
	
	
	if(aResponses [ aAnswers[ 4 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	
	aResponses= document.forms.form1.question4;
	
	
	
	if(aResponses [ aAnswers[ 5 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	aResponses= document.forms.form1.question5;

	
	
	
	if(nCorrectResponses>=4)
		{
		document.getElementById("picture1").src="graphics/smiley1.svg";
		alert("Felicidades! Tienes "+ nCorrectResponses + " correctas!");
		window.location = "Comer1.html"	;
		}
	

	
	else
	{
	document.getElementById("picture1").src="graphics/sad.svg";
	alert("Fallaste! Tienes "+ nCorrectResponses + " correcta(s).");
	    window.location = "Ver.html"  ;
	}

}
